package com.dcloud.streamweb.sysconfig.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.dcloud.streamweb.enums.SysConfigEnum;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: system_config
 * @Author: jeecg-boot
 * @Date:   2024-07-11
 * @Version: V1.0
 */
@Data
@TableName("system_config")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="system_config对象", description="system_config")
public class SystemConfig implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private Long id;
	/**key值*/
	@Excel(name = "key值", width = 15)
    @ApiModelProperty(value = "key值")
    private String key;
	/**value*/
	@Excel(name = "value", width = 15)
    @ApiModelProperty(value = "value")
    private String val;
	/**类型 如:sys  alarm*/
	@Excel(name = "类型 如:sys  alarm", width = 15)
    @ApiModelProperty(value = "类型 如:sys  alarm")
    private String type;
	/**isDeleted*/
	@Excel(name = "isDeleted", width = 15)
    @ApiModelProperty(value = "isDeleted")
    private Integer isDeleted;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**修改时间*/
	@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date editTime;
	/**creator*/
	@Excel(name = "creator", width = 15)
    @ApiModelProperty(value = "creator")
    private String creator;
	/**editor*/
	@Excel(name = "editor", width = 15)
    @ApiModelProperty(value = "editor")
    private String editor;

    public SystemConfig(String key, String val) {
        this.key = key;
        this.val = val;
        this.type = SysConfigEnum.getType(key);
    }

    public SystemConfig() {
    }
}
